package com.ssy.lingxi.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.dto.request.MemberSettlementStrategyRequest;
import com.ssy.lingxi.dto.response.MemberSettlementStrategyResponse;
import com.ssy.lingxi.dto.response.PlatformAccountConfigDetailVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

/**
 * 结算服务平台配置Feign接口
 * @author 伍将
 * @date 2020/11/19
 * @version 2.0.0
 */
@FeignClient(name = "settle-accounts-service")
public interface PlatformConfigControllerFeign {
    /**
     * 获取平台对公账户配置
     * @return 查询结果
     */
    @RequestMapping("/settle/accounts/platform/config/feign/getPlatformAccountConfig")
    Wrapper<PlatformAccountConfigDetailVO> getPlatformAccountConfig();

    /**
     * 获取会员有效结算策略(账期、月结)
     * @return 查询结果（如下级会员未开通账期、月结则返回的data为Null）
     */
    @RequestMapping("/settle/accounts/platform/config/feign/getMemberSettlementStrategy")
    Wrapper<MemberSettlementStrategyResponse> getMemberSettlementStrategy(@RequestBody @Valid MemberSettlementStrategyRequest memberSettlementStrategyRequest);
}
